<template>
  <div
    ref="customForm"
    class="van-input custom-form-container"
  >
    <CustomVanField
      :error-message="errorMessage"
      :label="label"
      :required="required"
    >
      <van-field
        v-model="inputValue"
        type="textarea"
        :disabled="canDo"
        :maxlength="mLength"
        :placeholder="placeholder || `请输入${label}`"
        :autosize="{ maxHeight: 100, minHeight: 50 }"
        :style="bG"
        show-word-limit
        @input="onInput"
        @blur="validate"
      />
    </CustomVanField>
  </div>
</template>

<script>
import field from '../mixins/field'
import model from '../mixins/model'
import textarea from '../mixins/textarea'
import rule from '../mixins/rule'
import collect from '../mixins/collect/input'
import disabled from '../mixins/setting/disabled'

export default {
  name: 'CustomVanTextarea',

  mixins: [field, model(), rule, collect, disabled, textarea],
}
</script>
